local flg,error_code = pcall(function()
    print("WARNING:PCALL START +++++++++++++++++++++++++++++++++++++++++++++++++")
    local theplayer = ThePlayer
    local x,y,z =    ThePlayer.Transform:GetWorldPosition()
    -- local npc_names_list = {"wilson","willow","wolfgang","wx78","wickerbottom","woodie","wes","waxwell","wathgrithr","webber","winona","warly","wendy","wonkey","walter","wagstaff_2"}
    local npc_names_list = {"wilson","willow","wolfgang","wx78","wickerbottom","woodie","wes","waxwell","wathgrithr","webber","winona","warly","walter","wendy","wonkey","wagstaff_2","wurt","wanda","wormwood","wortox"}
    local random_npc_name = npc_names_list[math.random(#npc_names_list)].."_npc"
    

    -- -- local npc = SpawnPrefab("webber".."_npc")


    local npc = SpawnPrefab(random_npc_name)
    npc.Transform:SetPosition(x+15,y,z+3)
    npc:PushEvent("player_link",ThePlayer)
    npc.npc_base_lib:Set_Time_Out(300)
    -- npc:AddTag("insomniac")
    npc:AddDebuff("npc_event_give_basic_supplies","npc_event_give_basic_supplies")
    -- npc:AddDebuff("npc_event_ghost","npc_event_ghost")   --- walter 有 bug
    -- npc:AddDebuff("npc_event_thief","npc_event_thief")
    -- npc:AddDebuff("npc_event_minifan","npc_event_minifan")
    -- npc:AddDebuff("npc_event_freeze","npc_event_freeze")
    -- npc:AddDebuff("npc_event_meteor","npc_event_meteor")
    -- npc:AddDebuff("npc_event_ask_for_razor","npc_event_ask_for_razor")
    -- npc:AddDebuff("npc_event_bushhat","npc_event_bushhat")
    -- npc:AddDebuff("npc_event_maxwell_and_shadow","npc_event_maxwell_and_shadow")
    -- npc:AddDebuff("npc_event_livingtrees","npc_event_livingtrees")
    -- npc:AddDebuff("npc_event_trident","npc_event_trident")
    -- npc:AddDebuff("npc_event_telestaff","npc_event_telestaff")
    -- npc:AddDebuff("npc_event_wes_and_ballons","npc_event_wes_and_ballons")
    -- npc:AddDebuff("npc_event_wolfgang_and_horn","npc_event_wolfgang_and_horn")
    -- npc:AddDebuff("npc_event_butterflies","npc_event_butterflies")

    ----------------------------------------------------------------------------------------------------------------
    -- local npc = SpawnPrefab("wilson_npc")
    -- npc.Transform:SetPosition(ThePlayer.Transform:GetWorldPosition())
    -- npc:PushEvent("player_link",ThePlayer)
    -- npc.npc_base_lib:Set_Time_Out(300)
    -- npc:AddDebuff("npc_event_minifan","npc_event_minifan")

    ----------------------------------------------------------------------------------------------------------------
    ------ 测试蝙蝠 + 海象人礼物
        --    local npc = SpawnPrefab("monster_npc_bat")

        -- local npc = SpawnPrefab("monster_npc_walrus")
        -- npc.Transform:SetPosition(ThePlayer.Transform:GetWorldPosition())
        -- npc:PushEvent("player_link",ThePlayer)
        -- npc.npc_base_lib:Set_Time_Out(300)
        -- npc:AddDebuff("npc_event_gift_from_walrus","npc_event_gift_from_walrus")
        -- npc:AddDebuff("npc_event_deal_with_bat","npc_event_deal_with_bat")

        -- npc.Transform:SetPosition(x+20,y,z+3)

    ----------------------------------------------------------------------------------------------------------------

    ------ 测试猪人
        -- local npc = SpawnPrefab("monster_npc_pigman_farmer")
        -- npc.Transform:SetPosition(x+3,0,z+3)
        -- npc:PushEvent("player_link",ThePlayer)
        -- -- npc.npc_base_lib:Set_Time_Out(100)
        -- npc:AddDebuff("npc_event_give_basic_supplies","npc_event_give_basic_supplies")

    ----------------------------------------------------------------------------------------------------------------
    -- local points = ThePlayer.components.npc_base_lib:GetSurroundPoints({target = nil,range = 5,num = 3})
    -- for k, temp_Point in pairs(points) do
    --     if temp_Point and temp_Point.x then
    --         SpawnPrefab("log").Transform:SetPosition(temp_Point.x,0,temp_Point.z)
    --     end
    -- end
    ----------------------------------------------------------------------------------------------------------------
    -- ThePlayer.sg:GoToState("chop_start")

    ----------------------------------------------------------------------------------------------------------------
    ------ 聊天/交易 泡泡相关
        -- ThePlayer.components.npc_base_lib:Show_Chat_Bubble({
        --     image = "compass",
        --     sound_off = true,
        -- })
        -- print(GetInventoryItemAtlas("npc_item_goldnugget_coin.tex"))
        -- ThePlayer.components.npc_base_lib:Show_Trade_Bubble({
        --     wanted_image = "npc_item_goldnugget_coin" , -- prefab name
        --     -- wanted_image = "goldnugget" , -- prefab name
        --     wanted_num = 5,     --   0~99
        --     ret_image = "moonglass",
        --     ret_num = 4,
        --     --     pause = nil
        --     --     height = 3,
        --     --      sound_off = nil   ----- true 的时候 关闭声音
        -- })
    
    ----------------------------------------------------------------------------------------------------------------
    --- -- 测试升级物品
        -- local item = SpawnPrefab("nightsword")
        -- item:PushEvent("upgrade","bloody")
        -- ThePlayer.components.inventory:GiveItem(item)
    ----------------------------------------------------------------------------------------------------------------
    ---------- NPC 刷新相关   ThePlayer.components.npc_everything_data:Set("NPC_SPAWN_TIMER",10)
        -- local NPC_SPAWN_QUEUE = ThePlayer.components.npc_everything_data:Get("NPC_SPAWN_QUEUE")
        -- local NPC_SPAWN_QUEUE_TIME = ThePlayer.components.npc_everything_data:Get("NPC_SPAWN_QUEUE_TIME")
        -- print(unpack(NPC_SPAWN_QUEUE_TIME))
        -- local event_table = {}
        -- local event_npc_name = {}
        -- for k, v in pairs(NPC_SPAWN_QUEUE) do
        --     -- print(v.event_name)
        --     table.insert(event_table,v.event_name)
        --     table.insert(event_npc_name,v.NPC_NAME)
        -- end
        -- print(unpack(event_table))
        -- print(unpack(event_npc_name))
        -- local current_time = ThePlayer.components.npc_everything_data:Get("NPC_SPAWN_TIMER")
        -- print("time : ",current_time)
    ----------------------------------------------------------------------------------------------------------------
    -- 小乌鸦交易相关
        -- local npc = SpawnPrefab("monster_npc_crowkid_trader")
        -- npc:PushEvent("Set",{
        --     pt = Vector3(x+5,y,z),
        --     trade_data = { 
        --         -- wanted_image = "goldnugget",
        --         wanted_image = "log",
        --         wanted_num = 40,
        --         ret_image = "moonglass",
        --         ret_num = 20,
        --         sound_off = true
        --     }
        -- })
        -- npc.Ready = true


        -- npc:DoTaskInTime(5,function()
        --     npc:PushEvent("flyaway")
        -- end)
    ----------------------------------------------------------------------------------------------------------------
    -- 测试特效
        -- SpawnPrefab("npc_fx_fire"):PushEvent("Set",{
        --     pt = Vector3(x+5,y,z),
        --     color = Vector3(255,34,34),
        --     -- scale = Vector3(2.5,2.5,2.5),
        --     -- t_scale = true,
        -- })
    ----------------------------------------------------------------------------------------------------------------
    --- 猪人竞技场
    -- ThePlayer:AddDebuff("npc_event_pigman_arena","npc_event_pigman_arena")
    ----------------------------------------------------------------------------------------------------------------
    -- 测试发条守卫
            -- local egg = SpawnPrefab("npc_item_clockwork_egg_base")
            -- egg.Transform:SetPosition(x+15,0,z)
            -- -- egg.components.projectile:Hit(ThePlayer)
            -- egg.components.projectile:Throw(ThePlayer,ThePlayer)
            -- SpawnPrefab("npc_item_clockwork_egg_killer"):PushEvent("Set",{
            --     pt = Vector3(x+15,0,z),
            --     target = ThePlayer,
            --     owner = ThePlayer,
            -- })
    ----------------------------------------------------------------------------------------------------------------
    -- 测试落物
        -- SpawnPrefab("npc_item_catch_game_falling_object"):PushEvent("Set",{
        --     pt = Vector3(x,0,z),
        --     name = "greengem",
        --     height = 15,
        --     fn = function(player,_prefab_name)
        --         print(player)
        --     end
        -- })

    ----------------------------------------------------------------------------------------------------------------
    --- 测试修改猪人外观
            -- local function trans(pigman)
            --     pigman.AnimState:SetBank("pigman")
            --     pigman.AnimState:SetBuild("quagmire_swampig_build") 
            --     pigman.AnimState:PlayAnimation("idle_loop", true)
            --     pigman.AnimState:Hide("hat")
            -- end
            -- local pigman = SpawnPrefab("pigman")
            -- pigman.Transform:SetPosition(x+3,0,z+3)
            -- trans(pigman)
    ----------------------------------------------------------------------------------------------------------------
    --- 测试 Wortox
            -- -- local npc = SpawnPrefab("wurt_npc")
            -- -- local npc = SpawnPrefab("wanda_npc")
            -- local npc = SpawnPrefab("wormwood_npc")
            -- -- local npc = SpawnPrefab("wortox_npc")
            -- npc.Transform:SetPosition(x+10,0,z)
            -- npc:PushEvent("player_link",ThePlayer)    
            -- npc:AddDebuff("npc_event_gift_from_wormwood","npc_event_gift_from_wormwood")
            -- -- npc:AddDebuff("npc_event_give_basic_supplies","npc_event_give_basic_supplies")
            -- -- npc:AddDebuff("npc_event_gift_from_wanda","npc_event_gift_from_wanda")

            -- -- for k, v in pairs(_G) do
            -- --     print(k,v)
            -- -- end
            -- -- print(_G.SetSkinsOnAnim)
            -- -- print(TheInventory:CheckClientOwnership(ThePlayer.userid, "wurt_none") )
    ----------------------------------------------------------------------------------------------------------------
    --- 测试雕像
            -- -- local item = SpawnPrefab("glassblock")
            -- local item = SpawnPrefab("shell_cluster")
            -- item.Transform:SetPosition(x,y,z)
            -- -- item.npc_everything_data:Set("for_sale",true)
            -- item.npc_everything_data:Set("type","statue")
            -- item.npc_base_lib:For_Sale_Sign_Show()

            -- item:DoTaskInTime(5,function()
            --     item:PushEvent("Buyer_Show")
            -- end)
    ----------------------------------------------------------------------------------------------------------------
    ---  测试初到存档的礼物
        --  local npc = TheSim:FindFirstEntityWithTag("monster_npc_pigman_intermediary_businessman")
        --  npc.npc_base_lib:Say("666666666") 
        -- local str = ThePlayer.userid .. "__trade_station_kit_gift"
        -- TheWorld.npc_everything_data:Set(str,nil)
        -- local fx = ThePlayer:SpawnChild("npc_fx_knowledge_flash")
        -- fx:PushEvent("Set",{})
    ----------------------------------------------------------------------------------------------------------------
    -- -- -- -- 扫描玩家附近物品
            -- local x,y,z =    ThePlayer.Transform:GetWorldPosition()

            -- local musthavetags = nil
            -- local canthavetags = {"INLIMBO"}
            -- local musthaveoneoftags = nil
            -- local range = 5
            -- local ents = TheSim:FindEntities(x, 0, z, range, musthavetags, canthavetags, musthaveoneoftags)
            -- for k, v in pairs(ents) do
            --     print(k,v)
            -- end
    ----------------------------------------------------------------------------------------------------------------
    --- 测试海象人
            -- -- local npc = SpawnPrefab("monster_npc_walrus")
            -- local npc = SpawnPrefab("monster_npc_little_walrus")
            -- npc.npc_base_lib:Equip_Random_Hat()
            -- npc.Ready = true
            -- npc.Transform:SetPosition(x,y,z)
            -- npc:DoTaskInTime(10,function()
            --     npc:Remove()
            -- end)
            -- npc:DoPeriodicTask(1,function()
            --     npc.npc_base_lib:Say("test : "..tostring(math.random(100)))
            -- end)
    ----------------------------------------------------------------------------------------------------------------
    ---- 测试cane
            -- -- local item = SpawnPrefab("cane")
            -- local item = SpawnPrefab("npc_item_debug_cane")
            -- -- -- -- -- for k, v in pairs(item.components) do
            -- -- -- -- --     print(k,v)
            -- -- -- -- -- end
            -- -- -- -- -- item:Remove()
            -- ThePlayer.npc_base_lib:Change_Item_Skin(ThePlayer,item)
            -- -- item:PushEvent("upgrade","erode")
            -- ThePlayer.components.inventory:GiveItem(item)
            
    ----------------------------------------------------------------------------------------------------------------
    ----- 测试特效
        --     ThePlayer:SpawnChild("npc_fx_forcefield"):PushEvent("Set",{
        --         pt = Vector3(0,0,0),
        --         -- color = Vector3(0,255,0),
        --         light = true,
        --         light_color = Vector3(255,0,0),
        --         scale = Vector3(0.5,0.5,0.5)
        -- })
    ----------------------------------------------------------------------------------------------------------------
    --- 蝴蝶测试
            -- local fx = SpawnPrefab("npc_projectile_butterfly")
            -- fx:PushEvent("Set", {
            --     pt = Vector3(x+10,0,z),
            --     target = TheSim:FindFirstEntityWithTag("monster_npc_pigman_intermediary_businessman"),
            --     owner = ThePlayer,
            --     -- target_fn = function(inst)
            --     --     inst:Remove()
            --     -- end
            -- })


    ----------------------------------------------------------------------------------------------------------------
    --- 测试小鱼人箱子
                -- local box = TheSim:FindFirstEntityWithTag("npc_item_wurt_hiding_box")
                -- if box then
                --     local pt = Vector3(box.Transform:GetWorldPosition())
                --     ThePlayer.Transform:SetPosition(pt.x,0,pt.z)
                -- end
    ----------------------------------------------------------------------------------------------------------------
    --------- 行动到指定目标坐标的时候才触发的event
        -- ThePlayer:ListenForEvent("onreachdestination",function()
        --     print("onreachdestination :",math.random(100))
        -- end)

    ----------------------------------------------------------------------------------------------------------------
    ---- 测试 粒子特效
            -- local inst = SpawnPrefab("npc_fx_snow_area")
            -- -- local inst = SpawnPrefab("cane_candy_fx")
            -- inst.Transform:SetPosition(x, y+5, z)
            -- inst:DoTaskInTime(10,inst.Remove)
    ----------------------------------------------------------------------------------------------------------------
    ---- 测试星门
            -- local inst = SpawnPrefab("npc_fx_star_door")
            -- inst:PushEvent("Set",{
            --         pt = Vector3(x,0,z),
            --         scale = Vector3(1.5,1.5,1.5),
            --         appear = true,

            --         appear_anim_speed_mult = 30,
            --         idle_anim_speed_mult = 5,
            --         disappear_anim_speed_mult = 30,

            --         layer = LAYER_WORLD_BACKGROUND,
            --         orientation = ANIM_ORIENTATION.OnGround,
            --         sort = 0,
            --     })

            -- inst:DoTaskInTime(3,function()
            --     inst:PushEvent("Set",{
            --         disappear_anim_speed_mult = 30,
            --         disappear = true
            --     })
            -- end)
            -- -- inst:AddTag("66666666666666")

            -- -- local inst = TheSim:FindFirstEntityWithTag("66666666666666")
            -- -- if inst then
            -- --     print("++++++++++")
            -- --     inst:PushEvent("Set2",{
            -- --         disappear = true,
            -- --         disappear_anim_speed_mult = 30,
            -- --         disapear_fn = function()
            -- --             print("66666666666666")
            -- --         end,
            -- --     })
            -- -- end

    ----------------------------------------------------------------------------------------------------------------
    ---- 传送 tag
        -- local inst = TheSim:FindFirstEntityWithTag("npc_item_red_portal")
        -- if inst then
        --     ThePlayer.Transform:SetPosition(inst.Transform:GetWorldPosition())
        -- else
        --     print("trans with tag error")
        -- end
    ----------------------------------------------------------------------------------------------------------------
    ---- 恶魔门
        -- local fx = SpawnPrefab("npc_projectile_wortox_soul_spawn")
        -- fx:PushEvent("Set",{
        --     pt = Vector3(x,y,z),
        --     target = TheSim:FindFirstEntityWithTag("npc_item_red_portal"),
        --     OnHit_fn = function(inst,attacker,target)
        --         print("hit",target)
        --     end
        -- })
        -- local inst = TheSim:FindFirstEntityWithTag("npc_item_red_portal")
        -- if inst then
        --     inst:PushEvent("Remove")
        -- end
    ----------------------------------------------------------------------------------------------------------------
    ---- 成就系统同步功能测试
            -- ThePlayer.npc_everything_data:Achievements_Set("Test","999999999999")
            -- print(  ThePlayer.npc_everything_data:Achievements_Get("Test")  )
    ----------------------------------------------------------------------------------------------------------------
    ---- 测试跨洞穴 RPC
            -- ThePlayer.npc_base_lib:RPC_World_PushEvent("test66",{"125","tttt"})
    ----------------------------------------------------------------------------------------------------------------
    ---- 测试 Woodlegs 帐篷
            -- TheWorld.npc_everything_data:Set("woodlegs_out_of_cage.task_end",true)
            -- local tent = TheSim:FindFirstEntityWithTag("npc_item_woodlegs_tent")
            -- print(tent.npc_everything_data:Get("Travelling"))
            -- -- tent:PushEvent("Create_Wating_Woodlegs")

    ----------------------------------------------------------------------------------------------------------------
    -- ---- 测试单机角色
        -- -- -- "wurt","wanda","wormwood","wortox"
        -- --         local npc = SpawnPrefab("wanda_npc")
        -- --         -- local npc = SpawnPrefab("wurt_npc")
        -- --         -- local npc = SpawnPrefab("wormwood_npc")
        -- --         -- local npc = SpawnPrefab("wortox_npc")
        -- --         -- local npc = SpawnPrefab("wagstaff_2_npc")
        --         -- -- local npc = SpawnPrefab("woodlegs_npc")
        --         -- -- local npc = SpawnPrefab("walani_npc")
        --         -- -- local npc = SpawnPrefab("wilba_npc")
        --             -- local npc = SpawnPrefab("wanda_npc")
        --             -- local npc = SpawnPrefab("wheeler_npc")
        --             local npc = SpawnPrefab("wilton_npc")
        -- --         npc:PushEvent("player_link",ThePlayer)             
        --         npc.Ready = true
        --         npc.Transform:SetPosition(x,0,z+3)
        -- --         -- -- npc:PushEvent("player_link",ThePlayer)
        -- --         -- -- npc:AddDebuff("npc_event_ask_for_razor","npc_event_ask_for_razor")
        --         npc.npc_base_lib:Say({"123","456","789","666666","999999"})
    ----------------------------------------------------------------------------------------------------------------
    --- 测试制作栏清除多余
        -- local shop = CRAFTING_FILTERS[string.upper("intermediary_pigman_shop")]
        -- for k, v in pairs(shop.default_sort_values) do
        --     print(k,v)
        -- end
    ----------------------------------------------------------------------------------------------------------------
    ---- 测试卡牌界面
        -- ThePlayer:PushEvent("npc_cards_sys.start")
        -- ThePlayer.components.npc_cards_sys:Start_test("npc_card_reaper")
        -- ThePlayer.components.npc_cards_sys:Start_test("npc_card_test")
        -- ThePlayer.components.npc_cards_sys:Start_test("npc_card_bottle_with_coin")
        -- ThePlayer.components.npc_cards_sys:Start_test("npc_card_teleportation")

        -- ThePlayer.components.npc_cards_sys:Start_test("npc_card_lightning")
        -- ThePlayer.SoundEmitter:PlaySound("dontstarve/creatures/mctusk/taunt")
    ----------------------------------------------------------------------------------------------------------------
    ---- 皮肤相关
        -- -- for k, v in pairs(PREFAB_SKINS["tophat"]) do
        -- for k, v in pairs(PREFAB_SKINS_IDS["tophat"]) do
        --     print(k,v)
        -- end
    ----------------------------------------------------------------------------------------------------------------
    ---- 玩具号角 + 彩虹
        -- ThePlayer:SpawnChild("npc_fx_rainbow")
        -- SpawnPrefab("npc_projectile_rainbow"):PushEvent("Set",{
        --         pt = Vector3(x+15,0,z+15), 
        --         target = ThePlayer,
        --         owner = ThePlayer,
        --         range = 0.5,
        --         speed = 10,
        --         target_fn = function(inst,owner,target)
        --             if target.___npc_fx_rainbow then
        --                 target.___npc_fx_rainbow:Remove()
        --             end
        --             target.___npc_fx_rainbow = target:SpawnChild("npc_fx_rainbow")
        --             target.components.health:DoDelta(100)
        --             inst:Remove()
        --         end,
        -- })

        -- local npc = SpawnPrefab("woodie")
        -- npc.Transform:SetPosition(x, y, z)
        -- npc.components.health:Kill()

    ----------------------------------------------------------------------------------------------------------------
    ----    找跟随锚点
            -- if ThePlayer.fx_test then
            --     ThePlayer.fx_test:Remove()
            --     ThePlayer.fx_test = nil
            -- end
            -- local fx = SpawnPrefab("torchfire")
            -- fx.Ready = true

            -- fx.entity:SetParent(ThePlayer.entity)
            -- fx.entity:AddFollower()
            -- -- fx.Follower:FollowSymbol(ThePlayer.GUID, "tail",-75, -70, 0)
            -- fx.Follower:FollowSymbol(ThePlayer.GUID, "swap_object",0, 0, 0)
            -- fx.Follower:SetOffset(-1)
            -- -- fx.Follower:FollowSymbol(owner.GUID, "swap_object", fx.fx_offset_x or 0, fx.fx_offset, 0)
            -- ThePlayer.fx_test = fx
            -- -- print(fx.fx_offset_x,fx.fx_offset)
            -- for k, v in pairs(getmetatable(fx.Follower).__index) do
            --     print(k,v)
            -- end
            
    ----------------------------------------------------------------------------------------------------------------
    ----- 暗影复制体
                -- local npc = SpawnPrefab("shadowprotector")
                -- npc.Transform:SetPosition(x+5,0,z)
                -- -- -- npc.components.skinner:CopySkinsFromPlayer(ThePlayer)
                -- -- -- npc.AnimState:SetMultColour(1, 1, 1, .5)
                -- -- -- -- TUNING.SHADOWWAXWELL_PROTECTOR_DURATION  --- 持续时间
                -- -- -- -- local function MakeOblivionSeeker(inst, duration)
                -- -- -- --     inst:ListenForEvent("timerdone", OnTimerDone)
                -- -- -- --     inst:AddComponent("timer")
                -- -- -- --     inst.components.timer:StartTimer("obliviate", duration)
                -- -- -- --     inst.OnEntitySleep = OnEntitySleep
                -- -- -- --     inst.OnEntityWake = OnEntityWake
                -- -- -- -- end
                -- -- -- -- inst:ListenForEvent("death", DropAggro)
                -- -- -- npc:ListenForEvent("death",function()
                -- -- --     print("66666666")
                -- -- -- end)

                -- npc:PushEvent("upgrade.npc","coin")
    ----------------------------------------------------------------------------------------------------------------
    ----- 地图尺寸相关

        -- SpawnPrefab("log").Transform:SetPosition(tempx+2,0,tempz +2)
        -- SpawnPrefab("log").Transform:SetPosition(tempx-2,0,tempz +2)
        -- SpawnPrefab("log").Transform:SetPosition(tempx+2,0,tempz -2)
        -- SpawnPrefab("log").Transform:SetPosition(tempx-2,0,tempz -2)
        -- local function Walk_in_sea_ON(owner)
        --     if owner.components.drownable and owner.components.drownable.enabled ~= false then
        --         owner.components.drownable.enabled = false
        --     end
        --     owner.Physics:ClearCollisionMask()
        --     owner.Physics:CollidesWith(COLLISION.GROUND)
        --     owner.Physics:CollidesWith(COLLISION.OBSTACLES)
        --     owner.Physics:CollidesWith(COLLISION.SMALLOBSTACLES)
        --     owner.Physics:CollidesWith(COLLISION.CHARACTERS)
        --     owner.Physics:CollidesWith(COLLISION.GIANTS)
        --     owner.Physics:Teleport(owner.Transform:GetWorldPosition())
        -- end

        -- local function Walk_in_sea_OFF(owner)
        --     if owner.components.drownable then
        --         owner.components.drownable.enabled = true
        --     end
        --     owner.Physics:ClearCollisionMask()
        --     owner.Physics:CollidesWith(COLLISION.WORLD)
        --     owner.Physics:CollidesWith(COLLISION.OBSTACLES)
        --     owner.Physics:CollidesWith(COLLISION.SMALLOBSTACLES)
        --     owner.Physics:CollidesWith(COLLISION.CHARACTERS)
        --     owner.Physics:CollidesWith(COLLISION.GIANTS)
        --     owner.Physics:Teleport(owner.Transform:GetWorldPosition())
        --     -- owner.Physics:Teleport(inst.Transform:GetWorldPosition())
        -- end

        -- Walk_in_sea_ON(ThePlayer)
        -- local w,h = TheWorld.Map:GetSize()
        -- print(x,z)
        -- local tempx = -142
        -- local tempz = 98
        -- ThePlayer.Transform:SetPosition(w*2, 0,h*2)
    ----------------------------------------------------------------------------------------------------------------
    ----- 骷髅测试
        --         local inst = TheSim:FindFirstEntityWithTag("playerskeleton")
        --         if inst then
        --             print(inst.char)
        --         end
    -- ----------------------------------------------------------------------------------------------------------------
    ------- 击退测试
        -- ThePlayer:PushEvent("knockback", {
        --     knocker = TheSim:FindFirstEntityWithTag("multiplayer_portal"),
        --     radius = 0,             --- 测试不出有啥用
        --     strengthmult = 2,       --- 击退力度
        --     forcelanded = false,    --- 软硬着陆，true 为不倒下着陆。
        -- })
    ----------------------------------------------------------------------------------------------------------------
    ------ 胡子动画
            -- ThePlayer.AnimState:PlayAnimation("idle_wilson_beard",true)
            -- ThePlayer.components.sanity.no_moisture_penalty = true
            -- print("ocean",TheWorld.Map:IsOceanAtPoint(x,0,z,true))
    ----------------------------------------------------------------------------------------------------------------
    ------- 测试新的卡牌界面
    -- ThePlayer.HUD:Display_NPC_Cards(ThePlayer,"npc_card_bottle_with_coin")
    ----------------------------------------------------------------------------------------------------------------
    -- c_give("hammer"):PushEvent("upgrade","gopher")
    ----------------------------------------------------------------------------------------------------------------
    -- ThePlayer.components.npc_cards_sys:Start_test("npc_card_reaper")
    ----------------------------------------------------------------------------------------------------------------
    --- wisper
    -- ThePlayer:PushEvent("npc_mod_event.whisper",{
    --     message = "6666666",
    --     m_colour = {0/255,150/255,0/255},
    -- })
        -- ThePlayer.npc_base_lib:Wisper({"666666666","7","8","9","10"})

    ----------------------------------------------------------------------------------------------------------------
    print("WARNING:PCALL END   +++++++++++++++++++++++++++++++++++++++++++++++++")
end)

if flg == false then
    print("Error : ",error_code)
end

-- dofile(resolvefilepath("test_fn/test.lua"))
